import request from '@/utils/request'
export default{
    // 添加课程信息
    addCourseInfo(courseInfo){
        return request({
            url:'/eduservice/course/addCourseInfo',
            method:'post',
            data:courseInfo
        })
    },
    // 查询所有讲师
    getTeacherAll(){
        return request({
            url:'/eduservice/teacher/findAll',
            method:'get'
        })
    },
    // 查询所有课程
    getSubjectList(){
        return request({
            url: `/eduservice/edu-subject/getOneTwoSubject`,
            method: 'get',
      })
    },
    // 根据课程ID查询课程信息
    getCourseById(id){
        return request({
            url: `/eduservice/course/getCourseInfoById/${id}`,
            method: 'get',
    })   
    },
    // 更改课程信息
    updateCourseInfo(courseInfo){
        return request({
            url: `/eduservice/course/updateCourseInfo`,
            method: 'post',
            data:courseInfo,
    })   
    },
    // queren课程信息
    publishCourseInfo(id){
        return request({
            url: `/eduservice/course/publishCourseInfo/${id}`,
            method: 'get',
    })   
    },
    // 最终发布课程信息
    CourseInfo(id){
        return request({
            url: `/eduservice/course/courseStatus/${id}`,
            method: 'post',
    })   
    },
    // 条件信息查询
    pageCourseCondition(page,limit,data){
        return request({
            url: `/eduservice/course/pageCourseCondition/${page}/${limit}`,
            method: 'post',
            data:data
    })   
    },
    // 课程删除
    deleteCourse(id){
        return request({
            url: `/eduservice/course/deleteCourse/${id}`,
            method: 'delete',
    })   
    },
}